home *** CD-ROM | disk | FTP | other *** search
File List | 1994-04-02 | 2.3 KB | 67 lines |
- Motorola DSP56000 Assembler Version 3.1 94-04-01 20:57:19 tst4.asm Page 1
-
-
-
- 1 ; Generate constant quadrature (IQ) sinewave (1.81 kHz)
- on left and right channels
- 2
- 214
- 215
- 216 000020 buflen equ 32
- 217 0001F4 f equ 500
- 218 001F40 fs equ 8000
- 219
- 220 P:0040 org p:user_code
- 221
- 222 P:0040 67F400 move #buffer+2,r7
- 000082
- 223 P:0042 057FA7 move #buflen*4-1,m7
- 224
- 225 P:0043 62F400 move #buffer,r2
- 000080
- 226 P:0045 3A0300 move #4-1,n2
- 227 P:0046 057FA2 move #buflen*4-1,m2
- 228
- 229 ctrlcd 1,r2,buflen,LINEI,0.0,0.0,LINEO|HEADP
- ,0.0,0.0
- 250 P:0052 205A00 move (r2)+
- 251 opencd fs/1000
- 280
- 281 ; wait for one sample
- 282 loop waitblk r2,buflen,1
- 300
- 301 ; then generate the sinewave
- 302 P:0064 45F400 move #0.3,x1
- 266666
- 303
- 304 P:0066 449800 move x:<t1,x0
- 305 P:0067 4699A0 mpy x0,x1,a x:<t2,y0
- 306 P:0068 441954 sub y0,a x0,x:<t2
- 307 P:0069 561800 move a,x:<t1
- 308
- 309 ; and output the generated samples
- 310 P:006A 4C5A00 move x0,y:(r2)+
- 311 P:006B 5E4A00 move a,y:(r2)+n2
- 312
- 313 P:006C 0C0056 jmp <loop
- 314
- 315
- 316 X:0018 org x:user_data
- 317
- 318 X:0018 t1 dc 0.9
- 319 X:0019 t2 dc 0.0
- 320
- 321 X:0080 buffer dsm buflen*4
- 322
- 323
- 324 Y:0018 org y:user_data
- 325
- 326 Y:0080 dsm buflen*4
- 327
- 328
- 329 end
-
- 0 Errors
- 0 Warnings
-
-